Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow YOLO models in same directory #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

majorsauce
Copy link

Problem

The YOLO models must currently be split into the segm/ and bbox/ folders which does not allow to share the models with other nodes/UIs which use a unified folder

Solution

In case the initial path lookup using the bbox/ or segm/ folder fails/has no results it will instead check the parent folder and try to load it from there, making it possible to put files directly in the "ultralytics" folder instead of "ultralytics_segm" and "ultralytics_bbox"

Caveats

The UI will show every model twice using the bbox/ and segm/ prefix. I see no way to fix this without fundamental changes to the whole model-loading part. This also means that whoever puts the files in a shared folder must also be aware what is a segmentation model and what is a detection/box model an wire it accordingly.

To increase sharing of models with other UIs the YOLO models should not have to be split out into the bbox/ and segm/ folder.
This fix only comes into action if the initial lookup in bbox or segm folder failed, allowing YOLO model sharing with other UIs like Automatic1111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant